#pragma once

#include "Common.h"
#include "Shader.h"

#include <unordered_map>
using std::unordered_map;

namespace davrenderer { 
	typedef unordered_map<string, Shader*> ShaderMan;	
	class ShaderManager; 
}
using namespace davrenderer;

/* * * * * * * * * 
 * ShaderManager
 * Author:	David Ogle
 * Date:	11/04/2012
 * Singleton class to manage shaders. 
 * Uses an unordered_map with string keys.
 * * * * * * * * */
class davrenderer::ShaderManager
{
private:

	// Hide constructor, copy constructer and destructor
	ShaderManager(void) { };
	ShaderManager(ShaderManager &copy) { };
	~ShaderManager(void) { };

protected:

	static ShaderMan shaders;

public:

	static void		add(string names, Shader* s);
	static Shader*	get(string name);

	static void		init();
	static void		destroy();	// Remember to call this before application exits!

};

